<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>安装验收报告</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../../css/global.css">
		<link rel="stylesheet" href="../../../../css/style.css">
		<style>

		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">安装验收报告</h1>
		</header>
		<div class="mui-content">
			<div class="details_con">
				<div hidden>
					<input type="hidden" id="id" />
					<input type="hidden" id="serviceNo" />
					<input type="hidden" id="planId" />
					<input type="hidden" id="noticeId" />
				</div>
				<div class="clum">
					<!-- 完成报告的工作开始时间 -->
					<span class="name">安装开始时间<em class="t_red">*</em></span>
					<button id='installStartTime' type="button" class="selectDate">请选择安装开始时间</button>
				</div>
				<div class="clum">
					<!-- 完成报告的工作结束时间 -->
					<span class="name">安装结束时间<em class="t_red">*</em></span>
					<button id='installEndTime' type="button" class="selectDate">请选择安装结束时间</button>
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">保修开始时间<em class="t_red">*</em></span>
					<button id='warrantyStartTime' type="button" class="selectDate">请选择保修开始时间</button>
				</div>
				<div class="clum nobor">
					<!-- 服务通知数据带入 -->
					<span class="name">保修结束时间<em class="t_red">*</em></span>
					<button id='warrantyEndTime' type="button" class="selectDate">请选择保修结束时间</button>
				</div>
				<div class="line"></div>
				<div class="clum">
					<span class="name">验收日期<em class="t_red">*</em></span>
					<button id='acceptanceTime' type="button" class="selectDate">请选择验收日期</button>
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">电脑厂家<em class="t_red">*</em></span>
					<input type="text" id="computerMfr" maxlength="100" class="d_ipt" placeholder="请输入电脑厂家" />
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">电脑型号<em class="t_red">*</em></span>
					<input type="text" id="modelNumber" maxlength="100" class="d_ipt" placeholder="请输入电脑型号" />
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">服务号<em class="t_red">*</em></span>
					<input type="text" id="serviceNumber" maxlength="150" class="d_ipt" placeholder="请输入服务号" />
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">系统软件<em class="t_red">*</em></span>
					<input type="text" id="syssoft" class="d_ipt" maxlength="150" placeholder="请输入系统软件" />
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">操作软件<em class="t_red">*</em></span>
					<input type="text" id="software" class="d_ipt" maxlength="150" placeholder="请输入操作软件" />
				</div>
				<div class="clum">
					<!-- 服务通知数据带入 -->
					<span class="name">选项软件<em class="t_red">&nbsp;</em></span>
					<input type="text" id="optionSoftware" class="d_ipt" maxlength="150" placeholder="请输入选项软件" />
				</div>
				<div class="line"></div>
				<div class="btn_box">
					<button id="saveBtn" class="fl">保存草稿</button>
					<button id="submitBtn" class="fr red">正式提交</button>
				</div>
				<div style="height: 50px;"></div>
			</div>
		</div>

		<!-- js代码 start -->

		<!-- 基础js start -->
		<script src="../../../../js/mui.min.js"></script>
		<script src="../../../../js/utils/h.js"></script>
		<script src="../../../../js/constant.js"></script>
		<script src="../../../../js/common.js"></script>
		<script src="../../../../js/utils/base64.js"></script>
		<script src="../../../../js/utils/md5.js"></script>
		<script src="../../../../js/utils/sortMap.js"></script>
		<script src="../../../../js/utils/http.js"></script>
		<script src="../../../../js/app.js"></script>
		<!-- 基础js end -->
		<script src="../../../../js/utils/rolldate.min.js"></script>
		<script src="../../../../js/fse/service/report/acceptance/acceptance.js"></script>
		<script type="text/javascript" charset="utf-8">
			/*
				app.jumpTo("view/service/report/acceptance/add.html",
				"view/service/report/acceptance/add.html",
				{
					serviceNo: "1",
					planId: 2,
					noticeId: 3,
					installStartTime: '',
					installEndTime: '',
					warrantyStartTime: '',
					warrantyEndTime: '',
					computerMfr: '',
					modelNumber: '',
					serviceNumber: '',
					software: '',
					optionSoftware: '',
					syssoft: ''
				})
			*/
			
			
			(function($, doc) {
				$.init();

				$.plusReady(function() {
					var self = plus.webview.currentWebview();
					// 获取上一个页面传过来的参数并显示到页面
					h('#serviceNo').val(self.serviceNo);
					h('#planId').val(self.planId);
					h('#noticeId').val(self.noticeId);
					if (self.installStartTime) {
						h('#installStartTime').html(self.installStartTime);
					}
					if (self.installEndTime) {
						h('#installEndTime').html(self.installEndTime);
					}
					if (self.warrantyStartTime) {
						h('#warrantyStartTime').html(self.warrantyStartTime);
					}
					if (self.warrantyEndTime) {
						h('#warrantyEndTime').html(self.warrantyEndTime);
					}
					if (self.computerMfr) {
						h('#computerMfr').val(self.computerMfr);
					}
					if (self.modelNumber) {
						h('#modelNumber').val(self.modelNumber);
					}
					if (self.serviceNumber) {
						h('#serviceNumber').val(self.serviceNumber);
					}
					if (self.software) {
						h('#software').val(self.software);
					}
					if (self.optionSoftware) {
						h('#optionSoftware').val(self.optionSoftware);
					}
					if (self.syssoft) {
						h('#syssoft').val(self.syssoft);
					}

					
					// 初始化时间控件
					initDateTimeControls()

					// 保存草稿按钮触发事件
					h('#saveBtn').tap(function() {
						h(this).attr('disabled','disabled');
						app.hideSoftKeybord()
						app.showWaiting('正在保存...')
						addSaveData()
					})
					
					// 正式提交按钮触发事件
					h('#submitBtn').tap(function() {
						h(this).attr('disabled','disabled');
						app.hideSoftKeybord()
						app.showWaiting('正在提交...')
						addSaveData(function() {
							submitCC()
						})
					})
				});
			}(mui, document));
		</script>
		<!-- js代码 end -->
	</body>
</html>
